package com.gpnu7_412.yanzhi.status.Impl;

import com.gpnu7_412.yanzhi.status.StatusCode;
import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author ZZH
 */

@Getter
@AllArgsConstructor
public enum ResultCode implements StatusCode {
    // 请求成功状态码
    SUCCESS(1000, "请求成功"),
    // 请求失败状态码
    FAILED(1001, "请求失败"),
    // 参数校验失败状态码
    VALIDATE_ERROR(1002, "参数校验失败"),
    // response返回包装失败状态码
    RESPONSE_PACK_ERROR(1003, "response返回包装失败"),

    DATA_NOT_FOUNT_EXCEPTION(4001, "数据库查无所需数据"),
    DATA_INCONSISTENCY_EXCEPTION(4002, "数据库数据不匹配"),
    SQL_EXECUTE_EXCEPTION(4003, "sql语句异常"),
    REQUEST_DATA_EXCEPTION(4004, "请求数据异常"),
    PERMISSION_DENIED_EXCEPTION(4005, "操作权限不足");

    private final int code;
    private final String message;

}
